package com.example.littlepainter.db

import android.view.PointerIcon
import androidx.lifecycle.LiveData
import androidx.room.Dao
import androidx.room.Delete
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query
import androidx.room.Update

@Dao
interface PictureDao {
    @Insert(onConflict = OnConflictStrategy.IGNORE)
    suspend fun insertPicture(picture: Picture)

    @Delete
    suspend fun deleteAll(pictures: List<Picture>)

    @Delete
    suspend fun deletePicture(picture: Picture)

    @Update
    suspend fun updatePicture(picture: Picture)

    @Query("select * from picture_table")
    fun queryPictures():LiveData<List<Picture>>
}